Image generating system and program

ABSTRACT

It is an objective to provide a image generating system and program capable of performing an environment mapping which can accurately represent the reflection of light source and the like. An environment texture to be viewed in an upward direction from an object is mapped onto the object in a direction toward the object from above the object without depending on the position or rotational angle of a virtual camera. A rotation matrix obtained from the rotational angle of the object about an axis in the world coordinate system is used to rotate the normal vector of the object. The coordinates NXW and NZW of the rotated normal vector are then used to obtain coordinates U and V. Another rotation matrix for transforming the local coordinate system to a coordinate system (XW, ZW, YW) may be used. With a surface of the object of which normal vector is oriented downwardly and slantingly with respect to the horizontal direction, an environment texture to be mapped when the normal vector is oriented to the horizontal direction is mapped, or the environment mapping may be omitted. The environment texture may be one that increases its brightness when the normal vector of the object is oriented toward a light source or shading processing.

TECHNICAL FIELD

The present invention relates to an image generating system and program.

BACKGROUND OF ART

There is known an image generating system for generating an image viewedfrom a given viewpoint in an object space which is a virtualthree-dimensional space. Such an image generating system is very popularsince a so-called virtual reality is provided. Where the imagegenerating system is applied to a racing game, a player can enjoy thethree-dimensional game by controlling a racing car (or object) forcausing his or her racing car to run in the object space and also tocompete against racing cars controlled by other players or computer.

Such an image generating system raises an important technical problem inthat more realistic images must be generated to improve the virtualreality for the players. One of the techniques to overcome such aproblem is known as an environment mapping technique.

The environment mapping maps an environment texture representing thesurrounding environment of an object thereon to represent a reflectionof the environment onto the object so that the reality of the objectimage will be improved.

The following example of the environment mapping techniques (which willbe called “comparative environment mapping”) may be considered.

In the comparative environment mapping, an environment texture viewablefrom the object toward a virtual camera is previously provided. Thisenvironment texture is then mapped from the virtual camera (or in adirection from the virtual camera toward the object). Thus, theenvironment can be reflected onto the object even when the virtualcamera is moved and a gazing point of the virtual camera moves behindthe object.

However, this comparative environment mapping has a problem in that alight source cannot accurately be reflected onto the object.

More particularly, it is now assumed that the positional relationshipamong an object (car) 10, a virtual camera 12 and a shading light source14 is as shown in FIG. 1. In this case, the shading ought to create thereflection of light source at a location A1 in FIG. 1. Moreover, ashadow 16 of the object 10 should fall at another location A2 in FIG. 1.

However, the comparative environment mapping always maps the environmentmapping starting from the virtual camera. If the comparative environmentmapping is to represent the reflection of light source, therefore, thelight source will always be reflected onto a gazing location of thevirtual camera 12 on the object 10. In other words, the light sourcewill be reflected onto a location A3 rather than the location A1 in FIG.1. The resulting image will contain nonconformity. To overcome such aproblem, the comparative environment mapping must map only anenvironment without the light source onto the object, rather thanmapping the light source.

DISCLOSURE OF INVENTION

It is therefore an objective of the present invention to provide animage generating system and program which can provide an environmentmapping capable of accurately representing the reflection of lightsource.

To this end, the present invention provides an image generating systemcomprising: means for reading a texture of an environment to be viewedin an upward direction from an object out from texture storage means andfor mapping the read environment texture onto the object in a directiontoward the object from above the object independently of a position or arotational angle of a virtual camera; and means for drawing an imageviewed from the virtual camera within an object space in which theobject moves.) The present invention also provides a computer-readableinformation storage medium comprising a program for executing the abovedescribed means. The present invention further provides acomputer-usable program embodied on an information storage medium or ina carrier wave, comprising a processing routine for executing the abovedescribed means.

According to the present invention, the environment texture to be viewedin an upward direction from the object is provided, rather than theenvironment texture to be viewed from the virtual camera (or viewpoint).This environment texture is mapped on the object in a direction fromabove the object toward the object, rather than from the virtual camera.Therefore, the present invention can prevent the environment mappingfrom being influenced by any change in the position or rotational angleof the virtual camera. As a result, the present invention will overcomesuch an unfavorable condition that the light source is always reflectedinto the gazing location of the virtual camera and can also realize theenvironment mapping in which the reflection of light source into anyother location can accurately be represented.

In the image generating system, information storage medium and programaccording to the present invention, a rotation matrix obtained based ona rotational angle of the object about each of axes in a worldcoordinate system may be used to rotate a normal vector of a surface ofthe object, and first and second texture coordinates for reading theenvironment texture out from the texture storage means may be obtainedbased on first and second coordinates of the rotated normal vector.Thus, the normal vector of the surface of the object will be rotatedaccording to a change of the rotational angle in the object, and theread texture coordinates will be changed. Therefore, the reflection ofenvironment onto the object will also be changed according to the changeof the rotational angle of the object, and an unexpectedly realisticimage will be generated.

The normal vector of the surface of the object may be given to each ofthe vertexes in the same surface. Or it may be a normal vector at therepresentative point or each dot on the surface of the object.

In the image generating system, information storage medium and programaccording to the present invention, the rotation matrix may transform alocal coordinate system (XL, YL, ZL) of the object to a coordinatesystem (XW, ZW, YW), when the local coordinate system is (XL, YL, ZL)and a world coordinate system is (XW, YW, ZW), and the first and secondcoordinates may be XW and YW coordinates, respectively. Thus, the secondtexture coordinate which belongs to the Y-field can be obtained based onthe YW coordinate belonging to the same Y-field. This simplifies theprocess.

In the image generating system, information storage medium and programaccording to the present invention, with a surface of the object ofwhich the normal vector is oriented downwardly and slantingly withrespect to a horizontal direction, an environment texture to be mappedwhen the normal vector of a surface of the object is oriented horizontalor substantially horizontal may be mapped. Alternatively, in the imagegenerating system, information storage medium and program according tothe present invention, the environment mapping may be omitted in respectof the surface of the object of which the normal vector is orienteddownwardly and slantingly with respect to a horizontal direction. Thiscan realize a proper environment mapping without causing any unfavorablecondition, even though the virtual camera looks the underside of theobject.

In the image generating system, information storage medium and programaccording to the present invention may further comprise means forperforming shading processing, and brightness of the environment texturemay increase when the normal vector of the surface of the object isoriented toward a light source for the shading processing. Thus, anyinconsistency between the direction of the light source for shadingprocessing and the location at which the light source is reflected intothe object, may be prevented from occurring. Therefore, a more naturaland realistic image can be generated.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a view illustrating the problem in the comparative environmentmapping.

FIG. 2 is a block diagram of an image generating system according to thepresent embodiment.

FIG. 3 is a view illustrating the environment mapping technique in theillustrated present embodiment.

FIG. 4 is a view showing an example of the environment texture.

FIGS. 5A and 5B show images generated by the comparative environmentmapping.

FIGS. 6A and 6B show images generated by the environment mapping of thepresent embodiment.

FIG. 7 is a view illustrating a technique of determining texturecoordinates by causing a rotation matrix to rotate a normal vector.

FIG. 8 is a view illustrating another technique of determining texturecoordinates by causing a rotation matrix to rotate a normal vector.

FIG. 9 is a view illustrating how a light source is reflected onto anobject depending on the rotational angle of the object.

FIGS. 10A and 10B are game scenes generated according to the presentembodiment.

FIGS. 11A and 11B illustrate a technique of overcoming a defect which israised when a virtual camera looks the underside of the object.

FIG. 12 is a view illustrating a technique of maintaining a consistencybetween the direction of a shading light source and the reflection oflight source from the environment mapping.

FIG. 13 is a flowchart illustrating the details of a process accordingto the present embodiment.

FIG. 14 is a hardware structure capable of realizing the presentembodiment.

FIGS. 15A, 15B and 15C illustrate various types of system to which thepresent embodiment can be applied.

BEST MODES FOR CARRYING OUT THE INVENTION

A preferred embodiment of the present invention will now be describedwith reference to the drawings. The present invention will be describedin connection with a racing game, but may similarly be applied to any ofvarious other games.

1. Configuration

FIG. 2 shows a block diagram of this embodiment. In this figure, thisembodiment may comprise at least a processing section 100 or aprocessing section 100 with a storage section 170 or a processingsection 100 with a storage section 170 and an information storage medium180. Each of the other blocks (e.g., control section 160, displaysection 190, sound output section 192, portable information storagesection 194 and communication section 196) may take any suitable form.

The processing section 100 is designed to perform various processingsfor control of the entire system, commands to the respective blocks inthe system, game processing, image processing, sound processing and soon. The function thereof may be realized through any suitable hardwaremeans such as processor (CPU, DSP and so on) or ASIC (or gate array orthe like) or a given program (or game program).

The control section 160 is used to input operational data from theplayer and the function thereof may be realized through any suitablehardware means such as a lever, a button, a housing or the like.

The storage section 170 provides a working area for the processingsection 100, communication section 196 and others. The function thereofmay be realized by any suitable hardware means such as RAM or the like.

The information storage medium (which may be a computer-readable storagemedium) 180 is designed to store information including programs, dataand others. The function thereof may be realized through any suitablehardware means such as optical memory disk (CD or DVD), magneto-opticaldisk (MO), magnetic disk, hard disk, magnetic tape, memory (ROM) or thelike. The processing section 100 performs various processings in thepresent invention (or this embodiment) based on the information that hasbeen stored in this information storage medium 180. In other words, theinformation storage medium 180 stores various pieces of information(programs and data) for executing the means of the present invention (orthis embodiment) which is particularly represented by the block includedin the processing section 100.

Part or the whole of the information stored in the information storagemedium 180 will be transferred to the storage section 170 when thesystem is initially powered on. The information stored in theinformation storage medium 180 may contain at least one of program codeset for processing the present invention, image data, sound data, shapeinformation of objects to be displayed, table data, list data, commandinformation for the processings in the present invention, informationfor performing the processings according to the commands and so on.

The display section 190 is designed to output an image generatedaccording to the present embodiment. The function thereof may berealized by any hardware structure such as CRT, LCD or HMD (Head MountDisplay).

The sound output section 192 is designed to output a sound generatedaccording to the present embodiment. The function thereof may berealized by any hardware structure such as a speaker or the like.

The portable information storage section 194 is designed to storeplayer's personal data, game data and so on and may take any of variousforms such as memory card, portable game machine and so on.

The communication section 196 is designed to perform various controlsfor communication between the game system and any external device (e.g.,host device or other image generating system). The function thereof maybe realized through any suitable hardware means such as processor orcommunication ASIC or according to a program.

Program or data for executing the means in the present invention (orthis embodiment) may be delivered from an information storage mediumincluded in a host device (or server) to the information storage medium180 through a network and the communication section 196. The use of suchan information storage medium in the hose device (or server) fallswithin the scope of the invention.

The processing section 100 includes a game processing section 110, animage processing section 130 and a sound processing section 150.

The game computing section 110 is designed to perform various processessuch as coin (or charge) reception, setting of various modes, gameproceeding, setting of scene selection, determination of the positionand rotation angle (about X-, Y- or Z-axis) of an object, object movingprocessing (or motion processing), determination of the position of theview point (or virtual camera) and the visual angle of the view point(or the rotational angle of the virtual camera), arrangement of theobject (or map object) within the object space, hit checking,computation of the game results (or scores), processing for causing aplurality of players to play in a common game space or various gamecomputations including game-over and other processes, based onoperational data from the control section 160 and the personal data,saved data and game program from the portable information storagesection 194.

The image processing section 130 is designed to execute various imageprocessings according to commands or others from the game processingsection 110. The sound processing section 150 is designed to executevarious sound processings according commands or others from the gameprocessing section 110.

All the functions of the game, image and sound processing sections 110,130, 150 may be realized in a manner of hardware or program.Alternatively, they may be realized in both the manners of hardware andprogram.

The image processing section 130 includes a geometry processing section(or three-dimensional computation section) 132 and a drawing (orrendering) section 140.

The geometry processing section 132 performs various geometryprocessings (or three-dimensional computations) such as coordinatetransformation, clipping, perspective transformation and light sourcecalculation. In this embodiment, object data such as object vertexcoordinates, vertex texture coordinates, brightness data or the likewhich are obtained after the geometry processing (or perspectivetransformation) are stored and saved in a main memory 172 in the storagesection 170.

The drawing section 140 is designed to draw an object on a frame buffer174, based on the object data after the geometry processing (orperspective transformation) and a texture stored in a texture storagesection 176. Thus, an image viewed from the virtual camera (or viewpoint) can be drawn (or generated) within the object space in which theobject moves.

The drawing section 140 includes a texture mapping section 142 and ashading processing section 144.

In this embodiment, an environment texture to be viewed upwardly fromthe object (or a texture as viewed through a fish-eye lens) ispreviously provided in the texture storage section 176. The texturemapping section 142 reads this environment texture out of the texturestorage section 176. The read environment texture is then mapped ontothe object in a downward direction from there above (in a directiontoward the object from above the object). Thus, there can be realized anenvironment mapping which accurately represents the reflection of lightsource and so on, even if the position or rotational angle (direction)of the virtual camera has been changed.

The shading processing section 144 is designed to perform the shadingprocess for the object. More particularly, the geometry processingsection 132 performs the calculation of light source and then determinesthe brightness (RGB) at each of the vertexes on the object, based oninformation of the shading light source, illumination model or normalvector at each of the vertexes in the object. The shading processingsection 144 determines the brightness at each dot on a primitive surface(polygon or curved face) through the Gouraud shading or the like, basedon the determined brightness at each vertex.

The geometry processing section 132 includes a normal-vector processingsection 134 which is designed to rotate the normal vector on the objectat each vertex (which in a broad sense, is a normal vector of thesurface of the object) through a rotation matrix from the localcoordinate system to the world coordinate system. In this embodiment,the texture coordinate of the environment texture is determined based onthe coordinates X, z of the rotated normal vector.

The image generating system of the present embodiment may be in the formof a single-player mode in which only a single player plays the game ora multi-player mode in which a plurality of players play the game.

In the multi-player mode, game images and sounds provided from theplayers may be generated by use of a single terminal or a plurality ofterminals which are connected together through a network (transmissionline or communication line).

2. Features of the Present Embodiment

In the comparative environment mapping illustrated in FIG. 1, theenvironment texture viewed from the object toward the virtual camera ispreviously provided. This environment texture is mapped onto the objectfrom the virtual camera.

According to the comparative environment mapping, even though thevirtual camera gazes any location on the object, the environment can bereflected onto that location. In other words, an unnatural image may begenerated, if the environment is not reflected on the object when thevirtual camera is moved to look the backside of the object.

However, this comparative environment mapping raises a problem in thatthe reflection of light source cannot accurately be represented. Asdescribed in connection to FIG. 1, the light source will always bereflected onto the gazing location of the virtual camera. The resultingimage has an inconsistency.

To overcome such a problem, there is first provided an environmenttexture which should be viewed upwardly (or in the upward direction)from the object 10 (model object), as shown by B1 in FIG. 3. Such anenvironment texture is shown in FIG. 4. This environment texture isdrawn as if the surrounding environment including the sun, sky, cloudsand so on to be reflected on the object 10 is viewed in the upwarddirection through a fish-eye lens. The environment texture may beswitched to another environment texture through time passage or gameprogress.

In this embodiment, as shown by B2 in FIG. 3, the provided environmenttexture is mapped onto the object from above the object (or in thedirection toward the object from above the object) without depending onthe position or rotational angle (direction) of the virtual camera 12.Thus, there can be realized an environment mapping which can accuratelyrepresent the reflection of light source and so on.

FIGS. 5A and 5B show images obtained by the comparative environmentmapping illustrated in connection with FIG. 1.

In FIG. 5A, a light source (evening glow) to be reflected by theenvironment texture as well as a virtual camera are in front of theobject 10. In this case, the light source (evening glow) is reflected onthe front of the object 10 as shown by C1. This provides a consistentimage.

On the other hand, FIG. 5B shows that the light source is in front ofthe object 10 while the virtual camera is in the right of the object 10.In this case, the comparative environment mapping reflects the lightsource on the right side of the object 10 as shown by C3, regardless ofthat the light source should be reflected into a location C2. In otherwords, the light source will be reflected into a location which does notcorrespond to the actual direction of the light source. Thus, aninconsistent image will be generated.

FIGS. 6A and 6B show images obtained through the environment mappingaccording to the present embodiment.

In FIG. 6A, both the light source and virtual camera are in front of theobject 10, as in FIG. 5A. The light source is properly reflected on thefront side of the object 10 as shown by D1, resulting in a consistentimage.

On the other hand, FIG. 6B shows that the light source is in front ofthe object 10 while the virtual camera is in the right of the object 10,as in FIG. 5B. In this case, the environment mapping of the presentembodiment will not reflect the light source on a location D3 unlikeFIG. 5B and will properly reflect the light source on a location D2. Inother words, the light source will accurately be reflected a locationwhich corresponds to the actual direction of light source, resulting ina consistent image. In such a manner, the present embodiment willaccurately reflect the light source on the location which corresponds tothe actual direction of light source, without depending on the positionor direction of the virtual camera. Therefore, the reflection of lightsource can be realized without consistency, which would be abandoned inthe comparative environment mapping due to inconsistency.

FIG. 7 illustrates a technique of determining the texture coordinates ofthe environment texture which is to be mapped onto the object 10.

First of all, a rotation matrix, for example, from the local coordinatesystem (XL, YL, ZL) to the world coordinate system (XW, YW, ZW) isdetermined based on the rotational angle of the object about each of theaxes in the world coordinate system. The rotational angle of the object10 about each axis in the world coordinate system will be determined inreal time for each frame, based on the operational data (player'scontrol data) from a player, a game program (for controlling the motionof the object 10) and other data. The determined rotational angles areused to determine the rotation matrix.

The determined rotation matrix is then used to rotate a normal vector N(or a vector representing the orientation of the surface) on eachsurface in the object 10. It is desirable that the normal vector is onegiven to each of the vertexes on each surface (polygon) of the object10, but it may be a normal vector on the representative point or eachdot on each surface. Base on the coordinates NXW, NZW in therotated-normal vector N, there is then determined coordinates U, V(which in a broad sense, are texture coordinates) for the texturemapping. These coordinates U, V are then used to read the correspondingtexture out of the texture storage section.

The actual texture coordinates TX, TY in the texture space will bespecified based on the above coordinates U and V, the offset addresses(base addresses) of the texture coordinates, information of texture sizeand so on.

Although FIG. 7 shows that the normal vector N is rotated through therotation matrix from the local coordinate system (XL, YL, ZL) to theworld coordinate system (XW, YW, ZW), the normal vector N may be rotatedthrough a rotation matrix from the local coordinate system (XL, YL, ZL)to a coordinate system (XW, ZW, YW). When the normal vector N is rotatedthrough such a rotation matrix, the coordinates NXW and NYW of therotated normal vector N can be used to determine the coordinates U and Vfor texture mapping. This reduces the load on the process.

In the arrangement of FIG. 7, the coordinate NZW belonging to Z-fieldmust be used to determine a coordinate V belonging to Y-field differentfrom the Z-field. This provides an additional process. On the contrary,the arrangement of FIG. 8 only requires the use of the coordinate NYWbelonging to the Y-field to determine the coordinate V belonging to thesame Y-field. This provides no additional process. Thus, the load on theprocess can be reduced.

When the normal vector is rotated through the rotation matrix with therotated normal vector being then used to determine the coordinates U andV of the texture mapping as described, there can be realized a properenvironment mapping corresponding to the position or direction of theobject.

As shown at E1 in FIG. 9, the brightness of the light source reflectedonto the'side of the object 10 is maximized because the normal vector Non the side of the object 10 coincides with the light source (or lightsource vector) in the opposite direction (or a differential angle beingequal to 180 degrees). On the other hand, as shown at E2 in FIG. 9, thebrightness of the light source reflected on the side of the object 10 isreduced smaller than that of E1 because the normal vector N on the sideof the object 10 does not coincide with the light source (or thedifferential angle being smaller than 180 degrees). When the position ordirection of the object 10 is changed, therefore, the reflection oflight source will be changed depending on the changed position ordirection of the object 10. This provides a new and realistic image.

Images which can be generated according to the present embodiment areshown in FIGS. 10A and 10B.

In FIG. 10A, the left side of the object 10 (or the right side thereofas viewed in the screen) is illuminated by the light source. In thiscase, the environment mapping of the present embodiment successfullycauses the light source to be reflected onto the left side of the objectas shown at F1. This provides no inconsistency between the environmentmapping and the shading for the object 10. According to the presentembodiment, the shape and position of a shadow 16 of the object 10 onthe road can be represented without inconsistency.

On the other hand, FIG. 10B shows that the leftward and forward side ofthe object 10 (or the rightward and forward side thereof as viewed inthe screen) is illuminated by the light source. In this case, theenvironment mapping of the present embodiment successfully causes thelight source to be reflected onto the leftward and forward side of theobject 10 as shown at F2. This also provides no inconsistency betweenthe environment mapping and the shading for the object 10. The shape andposition of a shadow 16 of the object 10 on the road can also berepresented without inconsistency.

The technique of the present embodiment in which the environment textureis mapped on the object from there above is particularly effective for aracing game in which it is extremely rare that the underside of theobject is viewed, for example.

For example, in a flight simulator game, the underside of an aircraftmay frequently be viewed by a virtual camera. In such a case, theenvironment mapping of the present embodiment may provide a defect thatthe sky is reflected onto the underside of the aircraft. To overcomesuch a problem, it is desirable to use the following technique.

In FIG. 11A, for example, a normal vector N1 on a surface SF1 of anobject (aircraft) 20 is oriented slantingly and downwardly relative tothe horizontal direction. In this case, a texture to be mapped ontoanother surface SF2 of a normal vector N2 in the horizontal orsubstantially horizontal direction (e.g., a texture at a position shownby G1) is mapped onto the surface SF1. In other words, a limit value isset on a texture coordinate system. Thus, a proper environment mappingcan be realized even though the virtual camera looks the underside ofthe object 20.

This technique is particularly advantageous in that even when oneenvironment texture is switched to another environment texture (e.g., aenvironment texture for night is switched to the other environmenttexture for daytime), the environment mapping can be realized reflectingthat switching.

In FIG. 11B, the environment mapping is omitted for normal vectors N11,N12, N13, N14, N15 and N16 oriented slantingly and downwardly relativeto the horizontal direction. Thus, it can be avoided that the sky willbe mapped onto the unsderside of the object 20.

It is further desirable that when the light source is to be reflectedonto the object, the light source of the environment texture is disposedat a position corresponding to the direction of the shading light source(light source for shading processing) Thus, there will not be providedany inconsistency between the reflection of light source due to theenvironment mapping and the shading of the object.

More particularly, as shown in FIG. 12, the environment texture isprovided such that the normal vector of the surface of the object 10 hasan increased brightness when it is oriented toward a shading lightsource 14 (see FIG. 4). More particularly, the environment texture iscaused to have an increased (or maximized) brightness for a surfacehaving its normal vector N1 oriented toward the light source 14 and areduced brightness for a surface having its normal vector N2 notoriented toward the light source 14. This environment texture is thenused to perform the mapping for the object 10. Thus, the consistency canbe maintained between the reflection of light source due to theenvironment mapping and the shading process. As a result, such morerealistic and natural images as shown in FIGS. 10A and 10B can begenerated.

As described in connection with FIGS. 7 to 9, this embodiment rotatesthe normal vector through the rotation matrix and also changes the readtexture-coordinates, depending on the changed rotational angle of theobject 10 and so on. Even though the position of the light source on theenvironment texture is stationary, therefore, the light source of theenvironment texture can be reflected into a proper locationcorresponding to the changed rotational angle of the object 10.

3. Processing in this Embodiment

The details of the process according to this embodiment will bedescribed with reference to the flowchart of FIG. 13.

First of all, a texture of model data (or a texture previously providedto represent the design of an object) and such an environment texture asshown in FIG. 4 are transferred to a texture storage section on VRAM(step S1).

Next, the object is subjected to the geometry processing, based onobject data (vertex coordinates, vertex texture coordinates, brightnessdata of an object and so on) (step S2). More particularly, thecoordinates of the object are transformed from the local coordinatesystem to the world coordinate system and then transformed from theworld coordinate system to the viewpoint coordinate system. Afterclipping, they are perspectively transformed to the screen coordinatesystem. After the perspective transformation, the transformed objectdata are stored and saved in a main memory (step S3).

The object is then drawn in a frame buffer, based on the perspectivelytransformed object data and the model data texture transferred at thestep S1 (step S4). Thus, the object of original design not subjected tothe environment mapping will be drawn.

Next, as described in connection with FIGS. 7 and 8, the normal vectorat each of the vertexes of the object is rotated through the rotationmatrix from the local coordinate system to the world coordinate system(step S5). Coordinates U and V of the environment texture are thendetermined based on the coordinates NXW and NZW of the rotated normalvectors (step S6). At this time, for example, a calculating formula fordetermined the coordinate s U and V is as follows:U=(NXW+1.0)/2  (1)V=(NZW+1.0)/2  (2)

This is because the range of change for the coordinates U and V isbetween 0.0 and 1.0 and the range of change for the coordinates NXW andNZW is between −1.0 and 1.0.

The texture coordinate in the texture space will be specified based onthe determined coordinates U and V, an offset address of the texturecoordinate, information of texture size and so on.

The so obtained coordinates U and V are then overwritten on thecoordinates U and V at each of the vertexes of the object data (orvertex list) which have been saved in the main memory at the step S3(step S7). In other words, the coordinates U and V set in the model dataof the object is replaced by the coordinates U and V determined based onthe normal vectors.

Next, the object is drawn in the frame buffer, based on the environmenttexture transferred at the step S1 and the object data overwritten bythe coordinates U and V at the step S7 (step S8) In other words, theobject onto which the environment texture of FIG. 4 is mapped is overwritten and drawn onto the object previously drawn at the step S4 (orthe object onto which the model data texture has been mapped). Accordingto this embodiment, the environment mapping is realized by drawing theobject twice with the same coordinates.

4. Hardware Configuration

A hardware configuration capable of realizing this embodiment will bedescribed with reference to FIG. 14.

A main processor 900 is actuated for performing various processings suchas game processing, image processing, sound processing and so on, basedon a program stored in CD 982 (information storage medium), a programtransferred through a communication interface 990, a program stored inROM 950 (another information storage medium) or the like.

A coprocessor 902 is operative to help the processing of the mainprocessor 900 and includes a product-sum calculator and analog dividerwhich can perform the high-speed computation. Thus, the coprocessor 902can execute a matrix operation (or vector operation) at high speed. Forexample, where the matrix or other operation is required to make aphysical simulation for moving and acting the object, a programoperating on the main processor 900 instructs (or invites) its ownprocessing to the coprocessor 902.

A geometry processor 940 is operative to perform geometry processingssuch as coordinate transformation, perspective transformation, lightsource calculation, curve generation and so on, and includes aproduct-sum calculator and analog divider which can perform thehigh-speed computation. Thus, the geometry processor 940 can execute amatrix operation (or vector operation) at high speed. For example, theprogram operating on the main processor 900 can instruct the coordinatetransformation, perspective transformation, light source calculation,curve generation and so on to the geometry processor 904.

A data expanding processor 906 is operative to perform a decodingprocess for expanding compressed image and sound data and anotherprocess for accelerating the decoding in the main processor 900. Thus, acompressed animation of MPEG or other type can be displayed in variousscenes such as opening, intermission, ending and game scenes. The imageand/or sound data to be decoded may be stored in ROM 950 and CD 982 orexternally transferred through the communication interface 990.

A drawing processor 910 is operative to draw (or render) an objectformed by polygons or primitive faces at high speed. When the object isto be drawn, the main processor 900 utilizes the function of a DMAcontroller 970 to deliver the object data to the drawing processor 910and also to transfer the texture to a texture storage section 924, ifnecessary. Thus, the drawing processor 910 draws the object on a framebuffer 922 at high speed while erasing the shade by use of a Z-buffer orthe like, based on the object data and texture. The drawing processor910 can also perform an α-blending (or translucency processing), amip-mapping, fogging, tri-linear filtering, anti-aliasing, shading andso on. If an image for one frame has been written into the frame buffer922, that image is displayed on a display 912.

A sound processor 930 includes a multi-channel ADPCM sound source forgenerating high-quality game sounds such as BGM, sound effect, voice andothers. The generated game sound will be outputted through a speaker932.

Operational data from a game controller 942, saved data from a memorycard 944 and personal data are transferred through a serial interface940.

ROM 950 has stored a system program and other. With an arcade gamesystem, the ROM 950 functions as an information storage medium forstoring various programs. The ROM 950 may be replaced by a hard disk.

RAM 960 is used as a working area for various processors.

The DMA controller 970 is operative to control DMA transfer between theprocessors and memories (RAM, VRAM, ROM and others).

A CD drive 980 drives the CD (or information storage medium) 982 inwhich the programs, the image data and the sound data have been storedand can access these programs and data.

The communication interface 990 is for transferring data between thegame system and any external through a network. In such a case, thenetwork connected to the communication interface 990 includes acommunication line (analog telephone line or ISDN) and a high-speedserial bus. The communication line enables the data transfer throughINTERNET. When the high-speed serial bus is used, the data can betransferred between the game system and the other image generatingsystem or game system.

Each means in the present invention may be executed only by the use ofhardware or only by a program which has been stored in the informationstorage medium or delivered through the communication interface or bythe use of both the hardware and program.

Where each means of the present invention is to be executed by the useof both the hardware and program, the information storage medium willstore a program (and data) for executing each means of the presentinvention using the hardware. More particularly, the aforementionedprogram instructs various processings to the processors 902, 904, 910,930 and so on which are hardware and delivers data to them, ifnecessary. Each of the processors 902, 904, 910, 930 and so on willexecute the corresponding means in the present invention, based on theinstruction and delivered data.

FIG. 15A shows an arcade game system to which the present embodiment isapplied. Players can enjoy a game by manipulating levers 1102 andbuttons 1104 while viewing a game picture displayed on a display 1100.The game system includes a system board (or circuit board) 1106 on whichvarious processors and memories are mounted. A program and/or data forexecuting each means of the present invention have been stored in amemory (or information storage medium) 1108 on the system board 1106.This information will be referred to “stored information”.

FIG. 15B shows a home game system to which the present embodiment isapplied. Players can enjoy a game by manipulating game controllers 1202and 1204 while viewing a game picture displayed on a display 1200. Inthis case, the stored information has been stored in a CD 1206 or memorycards 1208 and 1209 which are information storage media detachable intothe main system body.

FIG. 15C shows an example wherein this embodiment is applied to a gamesystem which includes a host device 1300 and terminals 1304-1 to 1304-nconnected to the host device 1300 through a network 1302 (which may be asmall-scale network such as LAN or a global network such as INTERNET).In such a case, the above stored information has been stored in aninformation storage medium 1306 such as magnetic disk device, magnetictape device, memory or the like which can be controlled by the hostdevice 1300, for example. If the terminals 1304-1 to 1304-n can generategame images and sounds in a stand-alone manner, the host device 1300delivers game program and other data for generating game images andsounds to the respective terminals 1304-1 to 1304-n. On the other hand,if the game images and sounds cannot be generated by the terminals inthe stand-alone manner, the host device 1300 will generate the gameimages and sounds which are in turn transmitted to the terminals 1304-1to 1304-n.

In the arrangement of FIG. 15C, each means of the present invention maybe executed by decentralizing into the host device (or server) andterminals. The above stored information for executing each means of thepresent invention may be distributed and stored into the informationstorage media in the host device (or server) and terminals.

Each of the terminals connected to the communication line may be eitherof home or arcade type. When the arcade game systems are connected tothe communication line, it is desirable that each of the arcade gamesystems includes a portable information storage device (memory card orportable game machine) which can not only transmit the informationbetween the arcade game systems but also transmit the informationbetween the arcade game systems and the home game systems.

The present invention is not limited to the things described inconnection with the above forms, but may be carried out in any ofvarious other forms.

In the invention relating to a sub-claim, part of any other claim towhich the sub-claim depends may be omitted. Furthermore, the primaryparts of the invention relating to one independent claim may be causedto depend on any other independent claim.

The shape or design of the environment texture mapped according to thepresent invention is desirably one as shown in FIG. 4, but not limitedto such a form.

The technique of determining the texture coordinate for reading theenvironment texture is particularly desirably one as describe inconnection with FIGS. 7 to 9, but may be carried out in any of variousother forms.

Where the image generating system supports the multi-texture mapping (ornarrow multi-texture mapping) function in which a plurality of texturesare mapped on one object in a hardware manner, it is desirable that boththe model data and environment textures are mapped over the object atthe same time. Where a plurality of textures are overlaid on one objectin such a manner, it is preferred that the object data contain aplurality of texture coordinate sets, that is, a texture coordinate forspecifying the model data texture and another texture coordinate forspecifying the environment texture.

The textures to be mapped onto the object are not limited to textures ofcolor information, but may be any one of textures relating to brightnessinformation, transparency information (a value), surface shapeinformation (bump value), reflectance information, reflective indexinformation and depth information.

Other than the racing game, the present invention may similarly beapplied to any of various other games such as fighting games, robotcombat games, sports games, competitive games, roll-playing games, musicplaying games, dancing games and so on.

Furthermore, the present invention can be applied to various imagegenerating systems such as arcade game systems, home game systems,large-scaled multi-player attraction systems, simulators, multimediaterminals, image generating systems, game image generating system boardsand so on.

1. An image generating system comprising: a memory which stores aprogram and data for image generating; and at least one processor whichis coupled with the memory and performs processing for image generating,the memory including a texture storage section which stores a texture ofan environment to be viewed in an upward direction from an object, andthe processor including a texture mapping section which reads theenvironment texture out from texture storage section and maps the readenvironment texture onto the object in a direction toward the objectfrom above the object independently of a position or a rotational angleof a virtual camera; and a drawing section which draws an image viewedfrom the virtual camera within an object space in which the object moveswith changing rotation angle, wherein a rotation matrix obtained basedon the rotational angle of the object about each of axes in a worldcoordinate system is used to rotate a normal vector of a surface of theobject, and wherein first and second texture coordinates for reading theenvironment texture out from the texture storage section are obtainedbased on first and second coordinates of the rotated normal vector. 2.The image generating system according to claim 1, wherein the rotationmatrix transforms a local coordinate system (XL, YL, ZL) of the objectto a coordinate system (XW, ZW, YW), when the local coordinate system is(XL, YL, ZL) and a world coordinate system is (XW, YW, ZW), and whereinthe first and second coordinates are XW and YW coordinates,respectively.
 3. The image generating system according to claim 1,wherein with a surface of the object of which the normal vector isoriented downwardly and slantingly with respect to a horizontaldirection, an environment texture otherwise intended to be mapped whenthe normal vector of a surface of the object is oriented horizontal orsubstantially horizontal is mapped.
 4. The image generating systemaccording to claim 1, wherein the environment mapping is omitted inrespect of the surface of the object of which the normal vector isoriented downwardly and slantingly with respect to a horizontaldirection.
 5. The image generating system according to claim 1, theprocessor further comprising a shading section which performs shadingprocessing, wherein brightness of the environment texture increases whenthe normal vector of the surface of the object is oriented toward alight source for the shading processing.
 6. A computer-usable programembodied on an information storage medium or in a carrier wave,comprising a processing routine for realizing: a texture storage sectionwhich stores a texture of an environment to be viewed in an upwarddirection from an object, a texture mapping section which reads theenvironment texture out from the texture storage section and maps theread environment texture onto the object in a direction toward theobject from above the object independently of a position or a rotationalangle of a virtual camera; and a drawing section which draws an imageviewed from the virtual camera within an object space in which theobject moves with changing rotation angle, wherein a rotation matrixobtained based on the rotational angle of the object about each of axesin a world coordinate system is used to rotate a normal vector of asurface of the object, and wherein first and second texture coordinatesfor reading the environment texture out from the texture storage sectionare obtained based on first and second coordinates of the rotated normalvector.
 7. The program according to claim 6, wherein the rotation matrixtransforms a local coordinate system (XL, YL, ZL) of the object to acoordinate system (XW, ZW, YW), when the local coordinate system is (XL,YL, ZL) and a world coordinate system is (XW, YW, ZW), and wherein thefirst and second coordinates are XW and YW coordinates, respectively. 8.The program according to claim 6, wherein with a surface of the objectof which the normal vector is oriented downwardly and slantingly withrespect to a horizontal direction, an environment texture otherwiseintended to be mapped when the normal vector of a surface of the objectis oriented horizontal or substantially horizontal is mapped.
 9. Theprogram according to claim 6, wherein the environment mapping is omittedin respect of the surface of the object of which the normal vector isoriented downwardly and slantingly with respect to a horizontaldirection.
 10. The program according to claim 6, further realizing ashading section which performs shading processing wherein brightness ofthe environment texture increases when the normal vector of the surfaceof the object is oriented toward a light source for the shadingprocessing.